package com.ak.zhuzhou;

import com.ak.zhuzhou.MenuChangeDataAdapter.ViewHolder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class MenuFanAdapter extends BaseAdapter {
	private Context context;

	public MenuFanAdapter(Context context) {
		this.context = context;
	}

	class ViewHolder {
		TextView name;
		ImageView gender;
		ImageView avatar;
		ImageView attention;
		TextView attentionText;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 10;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		final ViewHolder viewHolder;
		if (convertView == null) {
			LayoutInflater inflater = LayoutInflater.from(context);
			convertView = inflater.inflate(R.layout.menu_fan_list_item,
					null);
			viewHolder = new ViewHolder();
			viewHolder.name = (TextView) convertView
					.findViewById(R.id.menu_fan_name);
			viewHolder.gender = (ImageView) convertView
					.findViewById(R.id.menu_fan_gender);
			viewHolder.avatar = (ImageView) convertView
					.findViewById(R.id.menu_fan_avatar);
			viewHolder.attentionText = (TextView) convertView
					.findViewById(R.id.menu_fan_text);
			viewHolder.attention = (ImageView) convertView
					.findViewById(R.id.menu_fan_attention_image);
			convertView.setTag(viewHolder);
		} else {
			viewHolder = (ViewHolder) convertView.getTag();
		}
		// viewHolder.hint.setText(str2[position]);
		// viewHolder.userData.setText(str[position]);

		return convertView;

	}

}
